﻿using UnityEngine;

namespace ZCTouchDrawBoard
{
    /// <summary>
    /// TODO 这个还未完成
    /// </summary>
    /*public class MagicSamplePaint
    {
        #region PrivateField
        // 没有经过任何处理的基础颜色
        private AlphaPaper m_ColorPaper;
        // 经过多次处理后的顶层颜色
        private AlphaPaper m_ColorTopPaper;
        // 经过多次处理后的底层颜色
        private AlphaPaper m_ColorBottomPaper;
        // 纯颜色画笔
        private Material m_ColorPenShader;
        // 贴纸画笔
        private Material m_StickerPenShader;
        // 高斯模糊处理
        private Material m_BlurShader;
        // 魔法处理(mask和背景混合)
        private Material m_MagicShader;
        // 画笔模型
        private PaintModel m_PaintModel;
        #endregion

        #region PublicMethod
        public MagicSamplePaint()
        {
            m_ColorPenShader = new Material(Shader.Find("Hidden/ColorPenShader"));
        }
        #endregion

        #region PublicMethod
        // 画
        public void Draw(Mesh quad, Vector3[] position)
        {
            // 先绘制基础颜色
            m_ColorPaper.Use();
            // 选择是纯颜色还是贴纸

            // mColorPaper.Use();
            // mColorPenShader.SetPass(0);
            // for (int i = 0; i < position.Length; i++) {
            //     Matrix4x4 mvp = Matrix4x4.TRS(position[i], Quaternion.identity, Vector3.one * penSize);
            //     Graphics.DrawMeshNow(quad, mvp);
            // }
            // mPaper.Use();
            // mPaper.Clear();
            // mColorPenShader.SetPass(0);
            // Graphics.DrawMeshNow(quad, Matrix4x4.identity);
        }

        public void Clear()
        {
            m_ColorPaper.Clear();
        }

        public RenderTexture colorTexture
        {
            get
            {
                return m_ColorPaper.RenderTexture;
            }
        }
        #endregion
    }*/
}